#pragma once
#include <string>
#include "Timer.h"

class ICharGenObserver
{
public:
	virtual ~ICharGenObserver(){}
	virtual void CharEvent(char aChar, unsigned int aIndex) = 0;
	virtual void CharGenFinished() = 0;
};

class CCharGenerator : public ITimerObserver
{
public:
	CCharGenerator(CTimer* aTimer, unsigned int aResolution, ICharGenObserver* aObserver);
	virtual ~CCharGenerator(void);

	void Start(unsigned int aInterval, unsigned int aValue);

public:
	//From ITimerObserver
	void Finished();
		
private:
	CTimer* iTimer;
	ICharGenObserver* iObserver;
	std::string iStrValue;
	unsigned int iIndex;
	unsigned int iInterval;
	unsigned int iResolution;
};
